package file_demo1;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class demo6 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D://biji//test1.txt");

        FileOutputStream fos = new FileOutputStream("D://biji//test2.txt");

        byte[] b = new byte[2];

        int len ;
        while((len= fis.read(b)) != -1 ){
            fos.write(b,0,len);
        }

        fos.close();
        fis.close();

    }
}
